//
//  DoctorViewController.m
//  QuickCure
//
//  Created by 曹魏 on 16/9/15.
//  Copyright © 2016年 haoge. All rights reserved.
//

#import "MessageItem.h"
#import "DoctorMsgViewController.h"

@interface MessageItem()

@property (nonatomic,strong)DoctorMsgViewController *dmVC;

@end

static int flag = 2;
@implementation MessageItem

- (void)setIndex:(NSNumber *)index
{
    _index = index;
    
    if(flag)
    {
        DoctorMsgViewController *dmVC = [[DoctorMsgViewController alloc]init];
        dmVC.index = self.index;
        self.dmVC = dmVC;
        [self.contentView addSubview:dmVC.view];
        flag--;
    }
}

- (void)dealloc
{
    flag = 2;
}

@end










